<template>
  <div class="">
    <ul>
      <li
        v-for="(item, index) in $store.state.list"
        :key="index"
        v-show="item.status == 0"
        class="con"
      >
        <span> {{ item.title }}</span>

        <el-button @click="item.status = 1">标为已读</el-button>
      </li>
    </ul>
    <el-button @click="change1">全部已读</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  created() {},
  methods: {
    change1() {
      this.$store.commit("change1");
    },
  },
  components: {},
};
</script>

<style lang="scss">
.con {
  display: flex;
  justify-content: space-between;
  height: 50px;
  line-height: 50px;
}
</style>
